// Copyright 2009 Pigasus.
// GNU GPL v2.
// Author: John Zhang and Jordan Rupprecht.
//
// Defines the GetLength (List or Map) function

#ifndef GETLENGTH_H_
#define GETLENGTH_H_

#include "pigasus-types.h"

static inline int GetLength(const List &l) {
  return ((List*)(&l))->GetSize();
}

static inline int GetLength(const Map &m) {
  return ((Map*)(&m))->GetSize();
}

#endif // GETLENGTH_H_
